<script type="text/javascript">
  RED.nodes.registerType("alibabacloud-property-set", {
    category: RED._("node-red-contrib-alibabacloud/service:label.alibaba_cloud"),
    color: "#a6bbcf",
    defaults: {
      name: {
        value: "",
      },
      device: {
        type: "alibabacloud-device",
        required: true,
      },
      // property: { value: null, required: true },
    },
    icon: 'arrow-in.png',
    inputs: 0,
    outputs: 1,
    paletteLabel: RED._("node-red-contrib-alibabacloud/property:label.prop_set_req"),
    label: function () {
      return this.name || RED._("node-red-contrib-alibabacloud/property:label.aliyun_prop_set_req");
    },
  });
  RED.nodes.registerType("alibabacloud-property-post", {
    category: RED._("node-red-contrib-alibabacloud/service:label.alibaba_cloud"),
    color: "#a6bbcf",
    defaults: {
      name: {
        value: "",
      },
      device: {
        type: "alibabacloud-device",
        required: true,
      },
    },
    icon: 'arrow-out.png',
    inputs: 1,
    outputs: 0,
    paletteLabel: RED._("node-red-contrib-alibabacloud/property:label.prop_post"),
    label: function () {
      return this.name || RED._("node-red-contrib-alibabacloud/property:label.aliyun_prop_post");
    },
  });
</script>

<script type="text/html" data-template-name="alibabacloud-property-set">
  <div class="form-row">
      <label for="node-input-name"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
      <input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
  </div>
  <div class="form-row">
    <label for="node-input-device"><i class="fa fa-globe"></i> <span data-i18n="label.device"></span></label>
    <input type="text" id="node-input-device">
  </div>
</script>

<script type="text/html" data-template-name="alibabacloud-property-post">
  <div class="form-row">
      <label for="node-input-name"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
      <input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
  </div>
  <div class="form-row">
    <label for="node-input-device"><i class="fa fa-globe"></i> <span data-i18n="label.device"></span></label>
    <input type="text" id="node-input-device">
  </div>
</script>
